<template>
    <el-table :data="(data && data.data) ? data.data : []" @scroll="handleScroll" height="100%">
        <el-table-column v-if="data && data.fields" v-for="col in data?.fields" :prop="col.name" :label="col.name"
            :key="col.name" :width="60 + 10 * col.name.length">
        </el-table-column>
    </el-table>
</template>
<script lang="ts" setup>
import { PropType, watch, onBeforeMount } from "vue";
import { ElTable, ElRow, ElTableColumn } from "element-plus"
import { TableData } from "./models"
defineProps({
    data: Object as PropType<TableData>
})



function handleScroll(e: WheelEvent) {
}

</script>